package com.xrui.hbase.filter;

import java.util.List;

/**
 * Combines a list of column filters using a logical OR operator.
 * <p>
 * <p> Column filters are applied in order and lazily. </p>
 */

public final class OrColumnFilter extends OperatorColumnFilter {
    private static final long serialVersionUID = 1L;

    /**
     * Creates a column filter that combines a list of column filters with a logical OR operator.
     *
     * @param filters Column filters to combine with a logical OR.
     *                Nulls are filtered out.
     */
    OrColumnFilter(List<? extends ColumnFilter> filters) {
        super(Operator.OR, filters.toArray(new ColumnFilter[filters.size()]));
    }

    /**
     * Creates a column filter that combines a list of column filters with a logical OR operator.
     *
     * @param filters Column filters to combine with a logical OR.
     *                Nulls are filtered out.
     */
    OrColumnFilter(ColumnFilter... filters) {
        super(Operator.OR, filters);
    }
}
